{include file="public/header" /}
<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>{$Think.lang.fuwu_personal_shiming}</h3>
                <h5></h5>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
        <form id="form" method="post" name="form1">
            <input type="hidden" name="id" value="{$data.id}" id="id"/>
            <table class="ds-default-table">
                <tbody>
                <tr class="noborder">
                    <td class="required w120"><label class="validation">{$Think.lang.fuwu_personal_name}:</label></td>
                    <td class="vatop rowform"><input type="text" value="{$data.name}" name="name" id="name" class="txt" readonly="readonly" ></td>
                    <td class="vatop tips"></td>
                </tr>
                <tr class="noborder">
                    <td class="required w120"><label class="validation">{$Think.lang.fuwu_personal_idcard}:</label></td>
                    <td class="vatop rowform"><input type="text" value="{$data.idcard}" name="idcard" id="idcard" class="txt" readonly="readonly" ></td>
                    <td class="vatop tips"></td>
                </tr>
                <tr class="noborder">
                    <td class="required w120"><label class="validation">{$Think.lang.fuwu_personal_cardimgz}:</label></td>
                    <td class="vatop rowform">
                        {if $data.cardImgZ}
                        {php}
                        if ((strpos($data['cardImgZ'],'https://') !== false) || (strpos($data['cardImgZ'],'http://') !== false)){
                        {/php}
                        <img src="{$data.cardImgZ}" width="150"/>
                        <!--<input  name="file" id='upload_img1'  type="file">-->
                        <input type="hidden" name="cardImgZ" id='cardImgZ' value="{$data.cardImgZ}" readonly="readonly" >
                        <span>
                        <a href="javascript:dsLayerOpen('{:url('Fupersonalshiming/datu',['img'=>$data.cardImgZ])}','原图')">查看原图
                        </a></span>
                        {php}}else{{/php}
                        图片格式错误
                        {php}}{/php}
                        {else/}
                        未上传
                        {/if}
                    </td>
                    <td class="vatop tips">请上传后缀名为：*.jpeg *.jpg *.png 的文件</td>
                </tr>
                <tr class="noborder">
                    <td class="required w120"><label class="validation">{$Think.lang.fuwu_personal_cardimgf}:</label></td>
                    <td class="vatop rowform">
                        {if $data.cardImgF}
                        {php}
                        if ((strpos($data['cardImgF'],'https://') !== false) || (strpos($data['cardImgF'],'http://') !== false)){
                        {/php}
                        <img src="{$data.cardImgF}" width="150"/>
                        <!--<input  name="file" id='upload_img2'  type="file">-->
                        <input type="hidden" name="cardImgF" id='cardImgF' value="{$data.cardImgF}"  readonly="readonly" >
                        <span>
                        <a href="javascript:dsLayerOpen('{:url('Fupersonalshiming/datu',['img'=>$data.cardImgF])}','原图')">查看原图
                        </a></span>
                        {php}}else{{/php}
                        图片格式错误
                        {php}}{/php}
                        {else/}
                        未上传
                        {/if}
                    </td>
                    <td class="vatop tips">请上传后缀名为：*.jpeg *.jpg *.png 的文件</td>
                </tr>
                <tr class="noborder">
                    <td class="required w120"><label class="validation">{$Think.lang.fuwu_personal_cardImgs}:</label></td>
                    <td class="vatop rowform">
                        {if $data.cardImgS}
                        {php}
                        if ((strpos($data['cardImgS'],'https://') !== false) || (strpos($data['cardImgS'],'http://') !== false)){
                        {/php}
                        <img src="{$data.cardImgS}" width="150"/>
                        <!--<input  name="file" id='upload_img3'  type="file">-->
                        <input type="hidden" name="cardImgS" id='cardImgS' value="{$data.cardImgS}" readonly="readonly" >
                    <span>
                        <a href="javascript:dsLayerOpen('{:url('Fupersonalshiming/datu',['img'=>$data.cardImgS])}','原图')">
                            查看原图
                        </a></span>
                        {php}}else{{/php}
                        图片格式错误
                        {php}}{/php}
                        {else/}
                        未上传
                        {/if}
                    </td>
                    <td class="vatop tips">请上传后缀名为：*.jpeg *.jpg *.png 的文件</td>
                </tr>
                <tr class="noborder">
                    <td class="required w120"><label class="validation">{$Think.lang.fuwu_personal_learning}:</label></td>
                    <td class="vatop rowform"><textarea type="text" value="" name="learning" id="learning" readonly="readonly" >{$data.learning}</textarea></td>
                    <td class="vatop tips"></td>
                </tr>
                <tr class="noborder">
                    <td class="required w120"><label class="validation">{$Think.lang.fuwu_personal_work}:</label></td>
                    <td class="vatop rowform"><textarea type="text" value="" name="work" id="work" class="txt" readonly="readonly" >{$data.work}</textarea></td>
                    <td class="vatop tips"></td>
                </tr>
                {if $data.cardstatus==2}
                <tr class="noborder">
                    <td class="required w120">{$Think.lang.fuwu_personal_cardstatus}:</td>
                    <td class="vatop rowform">
                        <!--<input type="radio" value="1" name="cardstatus"  {if $data.cardstatus==1} checked{/if}>认证成功-->
                        <input type="radio" value="2" name="cardstatus" {if $data.cardstatus==2} checked{/if}>认证失败
                    </td>
                    <td class="vatop tips"></td>
                </tr>
                <tr class="noborder">
                    <td class="required w120">{$Think.lang.fuwu_personal_cardfail_resonse}:</td>
                    <td class="vatop rowform">
                        <textarea name="cardfail_resonse" readonly="readonly" >{$data.cardfail_resonse}</textarea>
                    </td>
                    <td class="vatop tips"></td>
                </tr>
                {/if}

                {if $data.cardstatus==3}
                <tr class="noborder">
                    <td class="required w120">{$Think.lang.fuwu_personal_cardstatus}:</td>
                    <td class="vatop rowform" id="ap_name">
                        <input type="radio" value="1" name="cardstatus"  {if $data.cardstatus==1} checked{/if} checked>认证成功
                        <input type="radio" value="2" name="cardstatus" {if $data.cardstatus==2} checked{/if}>认证失败
                    </td>
                    <td class="vatop tips"></td>
                </tr>
                <tr class="noborder" id="cardfail_resonse" style="display: none;">
                    <td class="required w120">{$Think.lang.fuwu_personal_cardfail_resonse}:</td>
                    <td class="vatop rowform">
                        <textarea id="cardfail_resonse_text" name="cardfail_resonse">{$data.cardfail_resonse}</textarea>
                    </td>
                    <td class="vatop tips"></td>
                </tr>
                {/if}

                {if $data.cardstatus==1}
                <tr class="noborder">
                    <td class="required w120">{$Think.lang.fuwu_personal_cardstatus}:</td>
                    <td class="vatop rowform">
                        <input type="radio" value="1" name="cardstatus"  {if $data.cardstatus==1} checked{/if}>认证成功
                        <!--<input type="radio" value="2" name="cardstatus" {if $data.cardstatus==2} checked{/if}>认证失败-->
                    </td>
                    <td class="vatop tips"></td>
                </tr>
                {/if}

                </tbody>
                <tfoot>
                <tr class="tfoot">
                    <td colspan="15" >
                        {if $data.cardstatus==3}
                        <input class="btn" type="submit" value="{$Think.lang.ds_submit}"/>
                        {elseif $data.cardstatus==2}
                        <a class="btn" href="{:url('Fupersonalshiming/shibai')}" title="{$Think.lang.ds_back}"><span>{$Think.lang.ds_back}</span></a>
                        {elseif $data.cardstatus==1}
                        <a class="btn" href="{:url('Fupersonalshiming/chenggong')}" title="{$Think.lang.ds_back}"><span>{$Think.lang.ds_back}</span></a>
                        {/if}
                    </td>
                </tr>
                </tfoot>
            </table>
        </form>
    </div>
<script src="{$Think.PLUGINS_SITE_ROOT}/mlselection.js"></script>
<link rel="stylesheet" href="{$Think.CHAT_SITE_URL}/css/chat.css">
<script>
    $(document).ready(function () {
        $("form").submit(function (e) {
            var status = $("input[type=radio]:checked").val();
            var cardfail_resonse = $('#cardfail_resonse_text').val();
            if(status==2 && cardfail_resonse.replace(/\s+/g,"") == ''){
               layer.msg('请填写实名认证失败原因');return false;
            }
        });
    });

    $("#ap_name").click(function(){
        var sex = $("input[type=radio]:checked").val();
        if(sex == 2){
            $("#cardfail_resonse").show();
        }else{
            $("#cardfail_resonse").hide();
        }
    });

    

</script>